<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/garble/garble_gate_standard.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('garble__gate__standard_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">garble_gate_standard.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="garble__gate__standard_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef LIBGARBLE_GARBLE_GATE_STANDARD_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define LIBGARBLE_GARBLE_GATE_STANDARD_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="garble_8h.html">garble.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aes_8h.html">garble/aes.h</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;garble_gate_eval_standard(<a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a> type, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> A, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> B, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *out,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                           <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *table, uint64_t idx, <span class="keyword">const</span> <a class="code" href="struct_a_e_s___k_e_y.html">AES_KEY</a> *key)</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;{</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keywordflow">if</span> (type == <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a>) {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        *out = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A, B);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> HA, HB, tmp, tweak, val;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keywordtype">int</span> a, b;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        a = <a class="code" href="garble_2block_8h.html#a9417de4be4701bd27d52e89a0ceeac89">garble_lsb</a>(A);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        b = <a class="code" href="garble_2block_8h.html#a9417de4be4701bd27d52e89a0ceeac89">garble_lsb</a>(B);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;        </div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        HA = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(A);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        HB = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(<a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(B));</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        tweak = <a class="code" href="garble_2block_8h.html#a877d2c3b464beb1bb40d5db7f71df6d9">garble_make_block</a>(idx, (<span class="keywordtype">long</span>) 0);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        val = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(<a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(HA, HB), tweak);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        tmp = a + b ? <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(table[2*a+b-1], val) : val;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        AES_ecb_encrypt_blks(&amp;val, 1, key);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        *out = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(val, tmp);</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    }</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;}</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    </div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;garble_gate_garble_standard(<a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a> type, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> A0, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> A1, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> B0,</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                            <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> B1, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *out0, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *out1, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> delta,</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                            <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *table, uint64_t idx, <span class="keyword">const</span> <a class="code" href="struct_a_e_s___k_e_y.html">AES_KEY</a> *key)</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="garble_2block_8h.html#aaba20a9be509e35b1ecaef329d3ce3fe">garble_equal</a>(A0, <a class="code" href="garble_2block_8h.html#a689895f62eeb101fdda55f78eb64f321">garble_zero_block</a>())</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;         || <a class="code" href="garble_2block_8h.html#aaba20a9be509e35b1ecaef329d3ce3fe">garble_equal</a>(A1, <a class="code" href="garble_2block_8h.html#a689895f62eeb101fdda55f78eb64f321">garble_zero_block</a>())</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;         || <a class="code" href="garble_2block_8h.html#aaba20a9be509e35b1ecaef329d3ce3fe">garble_equal</a>(B0, <a class="code" href="garble_2block_8h.html#a689895f62eeb101fdda55f78eb64f321">garble_zero_block</a>())</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;         || <a class="code" href="garble_2block_8h.html#aaba20a9be509e35b1ecaef329d3ce3fe">garble_equal</a>(B1, <a class="code" href="garble_2block_8h.html#a689895f62eeb101fdda55f78eb64f321">garble_zero_block</a>()))</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        &amp;&amp; g-&gt;type != <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">GARBLE_GATE_NOT</a>) {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        abort();</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">if</span> (type == <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a>) {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        *out0 = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A0, B0);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        *out1 = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(*out0, delta);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> tweak, blocks[4], keys[4], mask[4];</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> newToken, newToken2;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *label0, *label1;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">long</span> lsb0, lsb1;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        tweak = <a class="code" href="garble_2block_8h.html#a877d2c3b464beb1bb40d5db7f71df6d9">garble_make_block</a>(idx, (uint64_t) 0);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        lsb0 = <a class="code" href="garble_2block_8h.html#a9417de4be4701bd27d52e89a0ceeac89">garble_lsb</a>(A0);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        lsb1 = <a class="code" href="garble_2block_8h.html#a9417de4be4701bd27d52e89a0ceeac89">garble_lsb</a>(B0);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        A0 = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(A0);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        A1 = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(A1);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        B0 = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(<a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(B0));</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        B1 = <a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(<a class="code" href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a>(B1));</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        keys[0] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(<a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A0, B0), tweak);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        keys[1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(<a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A0, B1), tweak);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        keys[2] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(<a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A1, B0), tweak);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        keys[3] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(<a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(A1, B1), tweak);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        memcpy(mask, keys, <span class="keyword">sizeof</span> mask);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        AES_ecb_encrypt_blks(keys, 4, key);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        mask[0] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(mask[0], keys[0]);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        mask[1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(mask[1], keys[1]);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        mask[2] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(mask[2], keys[2]);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        mask[3] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(mask[3], keys[3]);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        newToken = mask[2 * lsb0 + lsb1];</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        newToken2 = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(delta, newToken);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        label0 = out0;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        label1 = out1;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">if</span> (lsb1 &amp; lsb0) {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            *label0 = newToken2;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            *label1 = newToken;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            *label0 = newToken;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            *label1 = newToken2;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        blocks[0] = *label0;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        blocks[1] = *label0;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        blocks[2] = *label0;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        blocks[3] = *label1;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">if</span> (2*lsb0 + lsb1 != 0)</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            table[2*lsb0 + lsb1 -1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(blocks[0], mask[0]);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keywordflow">if</span> (2*lsb0 + 1-lsb1 != 0)</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            table[2*lsb0 + 1-lsb1-1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(blocks[1], mask[1]);</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordflow">if</span> (2*(1-lsb0) + lsb1 != 0)</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            table[2*(1-lsb0) + lsb1-1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(blocks[2], mask[2]);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordflow">if</span> (2*(1-lsb0) + (1-lsb1) != 0)</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;            table[2*(1-lsb0) + (1-lsb1)-1] = <a class="code" href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a>(blocks[3], mask[3]);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    }</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="garble_2block_8h_html_a9417de4be4701bd27d52e89a0ceeac89"><div class="ttname"><a href="garble_2block_8h.html#a9417de4be4701bd27d52e89a0ceeac89">garble_lsb</a></div><div class="ttdeci">#define garble_lsb(x)</div><div class="ttdef"><b>Definition:</b> block.h:15</div></div>
<div class="ttc" id="garble_8h_html"><div class="ttname"><a href="garble_8h.html">garble.h</a></div></div>
<div class="ttc" id="garble_2block_8h_html_a689895f62eeb101fdda55f78eb64f321"><div class="ttname"><a href="garble_2block_8h.html#a689895f62eeb101fdda55f78eb64f321">garble_zero_block</a></div><div class="ttdeci">#define garble_zero_block()</div><div class="ttdef"><b>Definition:</b> block.h:11</div></div>
<div class="ttc" id="garble_2block_8h_html_a877d2c3b464beb1bb40d5db7f71df6d9"><div class="ttname"><a href="garble_2block_8h.html#a877d2c3b464beb1bb40d5db7f71df6d9">garble_make_block</a></div><div class="ttdeci">#define garble_make_block(X, Y)</div><div class="ttdef"><b>Definition:</b> block.h:16</div></div>
<div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="garble_2block_8h_html_aaba20a9be509e35b1ecaef329d3ce3fe"><div class="ttname"><a href="garble_2block_8h.html#aaba20a9be509e35b1ecaef329d3ce3fe">garble_equal</a></div><div class="ttdeci">#define garble_equal(x, y)</div><div class="ttdef"><b>Definition:</b> block.h:12</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a></div><div class="ttdef"><b>Definition:</b> garble.h:30</div></div>
<div class="ttc" id="struct_a_e_s___k_e_y_html"><div class="ttname"><a href="struct_a_e_s___k_e_y.html">AES_KEY</a></div><div class="ttdef"><b>Definition:</b> aes.h:57</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a></div><div class="ttdeci">garble_gate_type_e</div><div class="ttdef"><b>Definition:</b> garble.h:25</div></div>
<div class="ttc" id="garble_2block_8h_html_a5e8e50bd0f3c713be61a20f336e5b013"><div class="ttname"><a href="garble_2block_8h.html#a5e8e50bd0f3c713be61a20f336e5b013">garble_double</a></div><div class="ttdeci">#define garble_double(B)</div><div class="ttdef"><b>Definition:</b> block.h:17</div></div>
<div class="ttc" id="aes_8h_html"><div class="ttname"><a href="aes_8h.html">aes.h</a></div></div>
<div class="ttc" id="garble_2block_8h_html_ad6447e1e625ffefda7dc7f4ef0c44be2"><div class="ttname"><a href="garble_2block_8h.html#ad6447e1e625ffefda7dc7f4ef0c44be2">garble_xor</a></div><div class="ttdeci">#define garble_xor(x, y)</div><div class="ttdef"><b>Definition:</b> block.h:10</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">GARBLE_GATE_NOT</a></div><div class="ttdef"><b>Definition:</b> garble.h:31</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_c655749829cb727292045fefce142869.html">garble</a></li><li class="navelem"><a class="el" href="garble__gate__standard_8h.html">garble_gate_standard.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
